import request from '@/utils/request'

// 文章详情
export function getArticleInfo(articleId) {
    return request({
        url: '/api/article/' + articleId,
        method: 'get',
        params: {}
    })
}

// 时间轴
export function articleTimeAxis() {
    return request({
        url: '/api/article/timeAxis',
        method: 'get',
        params: {}
    })
}

// 文章新增
export function saveArticle(data) {
    return request({
        url: '/api/article/add',
        method: 'post',
        headers: {
            'Content-Type': 'application/json'
        },
        data
    })
}

// 文章新增
export function uploadFile(file) {
    return request({
        url: '/file/upload',
        method: 'post',
        data: file
    })
}

